package site.marqstree.latte.ui.camera;

import android.net.Uri;

import site.marqstree.latte.core.delegates.PermissionCheckerDelegate;
import site.marqstree.latte.core.util.file.FileUtil;

/*
 * 项目名: EleCommerce
 * 包名: site.marqstree.latte.core.ui.camera
 * 文件名: LatteCamera
 * 创建者: marqstree
 * 创建时间: 2020/2/4 15:38
 * 描述: 照相机调用类
 */
public class LatteCamera {

    public static Uri createCropFile() {
        return Uri.parse
                (FileUtil.createFile("crop_image",
                        FileUtil.getFileNameByTime("IMG", "jpg")).getPath());
    }

    public static void start(PermissionCheckerDelegate delegate) {
        new CameraHandler(delegate).beginCameraDialog();
    }
}
